<template>
  <div id="app">
    <!-- <router-view /> -->
    <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>

<script>
export default {
  name: "App",
  provide() {
    return {
      reload: this.reload
    };
  },
  data() {
    return {
      isRouterAlive: true
    };
  },
  methods: {
    // 刷新页面方法
    // reload() {
    //   this.isRouterAlive = false; //先关闭，
    //   this.$nextTick(function() {
    //     this.isRouterAlive = true; //再打开
    //   });
    // }
  }
};
</script>

<style lang="scss">
@import "./styles/global.css";
@import "./styles/global.scss";
</style>
